package com.cncf.annotation;

/**
 * @author zj
 */
public class Test {
    public static void main(String[] args) {

        String reg = ".*\\/\\/([^\\/\\:]*).*";

        String str1 = "http://127.0.0.1/source/head/12321321_42131231.jpg";

        //System.out.println (str1.replaceAll (reg, "$1"));

        String oldUrl = "http://www.warmtale.com/source/works/1/eHfuEh8fjw5LWQYj.jpg";
        System.out.println(oldUrl);
        String oldHost=oldUrl.replaceAll (reg, "$1");
        String newHost="47.93.242.215";
        String newUrl=oldUrl.replace(oldHost,newHost);
        System.out.println (newUrl);
    }


}
